package main

import (
	"fmt"
	"net/http"
	"time"

	"github.com/prometheus/client_golang/prometheus/promhttp"
)

func TimeIt(fname func()) func() {

	return func() {
		t := time.Now()

		fname()

		fmt.Printf("Executing time: %v .\n", time.Since(t))
	}
}

func LogIt(f func()) func() {

	return func() {

		f()

	}
}

func main() {
	http.Handle("/prometheus", promhttp.Handler())
	http.ListenAndServe(":8001", nil)
}
